#!/bin/bash

rm -rf /usr/local/include/OrionV2
rm -rf /usr/local/lib/libOrionV2.*

#make action
cmake . -DENABLE_DEMO=OFF -DENABLE_LOG=OFF -DCMAKE_BUILD_TYPE=RELEASE
make -j8
make install
make clean
ldconfig

#rm CMakeCache
rm -rf ./CMakeCache.txt
rm -rf ./CMakeFiles/
rm -rf ./Makefile
rm -rf ./cmake_install.cmake
rm -rf ./install_manifest.txt

#rm Demo CMakeCache
rm -rf ./Demo/CMakeCache.txt
rm -rf ./Demo/CMakeFiles/
rm -rf ./Demo/Makefile
rm -rf ./Demo/cmake_install.cmake
rm -rf ./Demo/install_manifest.txt
